ArrayToArray Node
The ArrayToArray Node
gets an array of elements to the Input Port
, applies a group operation to the elements, sends the array to the Output Port
.
The example above demostrates the results of applying the function SORT(array)
to the array [5,3,4,7]
.
The ArrayToElement Node
returns the array [7,5,4,3]
sorted from max to min value.
More examples
array in | function | array out |
---|---|---|
[5,3,4,7] | SORT(array, True) | [7,5,4,3] |
[5,3,4,7] | SORT(array, False) | [3,4,5,7] |
[5,3,4,7] | FILTER(array, element > 4) | [5,7] |
[5,3,4,7] | MAP(array, element + 2) | [7,5,6,9] |
[{"a": 5, "b": 2}, {"a": 3, "b": 8}, {"a": 1, "b": 6}, {"a": 7, "b": 4}] | SORT(array, GET_FIELD(element, "b"), True) | [{"a": 3, "b": 8}, {"a": 1, "b": 6}, {"a": 7, "b": 4}, {"a": 5, "b": 2}] |
[{"a": 5, "b": 2}, {"a": 3, "b": 8}, {"a": 1, "b": 6}, {"a": 7, "b": 4}] | MAP(array, GET_FIELD(element, "b") + 2) | [{"a": 5, "b": 4}, {"a": 3, "b": 10}, {"a": 1, "b": 8}, {"a": 7, "b": 6}] |
[{"a": 5, "b": 2}, {"a": 3, "b": 8}, {"a": 1, "b": 6}, {"a": 7, "b": 4}] | FILTER(array, GET_FIELD(element, "b") > 4) | [{"a": 3, "b": 8}, {"a": 1, "b": 6}]}` |